home *** CD-ROM | disk | FTP | other *** search
- <%@ Language=VBScript CODEPAGE=65001 %>
- <!--#include file="include/wmsLocStrings.inc"-->
- <!--#include file="include/wmsServerHash.inc"-->
- <!--#include file="include/wmsPlugins.inc"-->
- <!--#include file="include/wmsHeader.inc"-->
- <!--#include file="include/wmsPageBanner.inc"-->
- <!--#include file="include/wmsError.inc"-->
- <%
- '+-------------------------------------------------------------------------
- '
- ' Microsoft Windows Media
- ' Copyright (C) Microsoft Corporation. All rights reserved.
- '
- ' File: DigestAuthenRealmAdmin.asp
- '
- ' Contents:
- '
- '--------------------------------------------------------------------------
-
- ConnectToPlugin
- ConnectToPluginAdmin
-
- BeginErrorHandling
-
- on error resume next
-
- Dim bError
- dim strRealm
- Dim dwTabIndex
- dwTabIndex = 0
-
- strRealm = Left( RemoveSpecifiedChars( SafeUnescape( posting( "realm" ) ), REGEXP_DANGEROUS_CHARS ), MAX_LEN_REALM )
-
- Dim strOp
- strOp = trim( posting( "submit" ) )
- if( 0 < Len( strOp ) ) then
- if ( 0 >= Len( strRealm ) ) then
- err.raise( -1 )
- err.description = RemoveDangerousCharacters( L_SPECIFYREALM_TEXT )
- ErrorDetected( "Realm" )
- Session( "PageReloadedToDisplayError" ) = 1
- bError = TRUE
- else
- g_objPluginAdmin.Realm = CStr( strRealm )
-
- if( ErrorDetected( "Realm" ) ) then
- Session( "PageReloadedToDisplayError" ) = 1
- bError = TRUE
- else
- if( "" <> g_strEncodedPubPointName ) then
- Response.Redirect( "../pubpoints/pubpoint_props.asp?server=" & g_strQueryStringServer & "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex") )
- else
- Response.Redirect( "../server_props.asp?server=" & g_strQueryStringServer & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex") )
- end if
- end if
- end if
- else
- strRealm = RemoveSpecifiedChars( SafeUnescape( CStr( g_objPluginAdmin.Realm ) ), REGEXP_DANGEROUS_CHARS )
- end if
-
- WriteHTMLHeader( g_strDecodedServerName )
- %>
- <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
- <% WritePluginJSUtils %>
- <script language="JavaScript">
- <!--
- /*@cc_on @*/
-
- //////////////////////////////////////////////////////////////////////////////////
- function ValidateRealm()
- {
- <% jsTRY %>
- var bEnableOkay = true;
- var szRealmUnfiltered = new String( document.pluginForm.realm.value );
- var szRealmFiltered = "";
-
- // perform left trim
- szRealmUnfiltered = szRealmUnfiltered.replace( /^\s+/, "" );
-
- // perform right trim
- szRealmUnfiltered = szRealmUnfiltered.replace( /\s+$/, "" );
-
- if( 0 == szRealmUnfiltered.length )
- {
- document.pluginForm.ok.disabled = true;
- return;
- }
-
- if( bEnableOkay )
- {
- szRealmFiltered = szRealmUnfiltered.replace( /\`|\'|!|@|#|\$|%|\^|\&|\||{|}|;|:|\<|\>|\?|\"/g, "" );
- if( szRealmUnfiltered != szRealmFiltered )
- {
- bEnableOkay = false;
- }
- }
-
- if( bEnableOkay )
- {
- document.pluginForm.realm.style.color = "#000000";
- document.pluginForm.ok.disabled = false;
- }
- else
- {
- document.pluginForm.realm.style.color = "#ff0000";
- document.pluginForm.ok.disabled = true;
- }
- <% jsCATCH %>
- }
- -->
- </script>
- </head>
- <body class="pluginBody" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
- <% DrawPluginBanner %>
- <table width="90%">
- <tr>
- <td valign=top>
- <% WriteStdPluginForm %>
- <table class="propgroupbox" width="90%" cellspacing="0" cellpadding="3">
- <tr>
- <td>
- <div class="helptext" align="left"><%= Server.HTMLEncode( L_DIGESTHELP_TEXT ) %></div><br>
- </td>
- </tr>
- <tr>
- <td>
- <div class="helptext"><% RenderWithErrorCheck Server.HTMLEncode( L_REALMCOLON_TEXT ), "Realm" %><br></div>
- </td>
- </tr>
- <tr>
- <td>
- <input
- type="text"
- name="realm"
- size="75"
- maxlength="<%= Server.HTMLEncode( MAX_LEN_REALM ) %>"
- value="<%= RemoveSpecifiedChars( strRealm, REGEXP_DANGEROUS_CHARS ) %>"
- tabindex="1"
- onChange="JavaScript:ValidateRealm();"
- onPaste="JavaScript:ValidateRealm();"
- onKeyDown="JavaScript:ValidateRealm();"
- onKeyUp="JavaScript:ValidateRealm();"
- ><br>
- </td>
- </tr>
- </table>
- <br>
- </td>
- </tr>
- <tr>
- <td valign=bottom>
- <input type="submit" align="baseline" name="ok" value="<%= Server.HTMLEncode( L_OKAYBUTTON_TEXT ) %>" =2>
- <input type="button" align="baseline" name="cancel" onclick="JavaScript:Cancel();" value="<%= Server.HTMLEncode( L_CANCELBUTTONSPACED_TEXT ) %>" tabIndex="3">
- <input type="button" align="baseline" name="help" onclick="JavaScript:DoPluginHelp( '<%= H_DIGAUTHENHELPTOPIC %>' );" value="<%= Server.HTMLEncode( L_HELPBUTTONSPACED_TEXT ) %>" id="help" tabindex=4>
- </td>
- </tr>
- </table>
- </font>
- </form>
- <%
- AlertUserWithPopupErrorDialog
- OnErrorGoBack
- DrawStdFooter
- %>
- </body>
- </html>
- <%
- LatchCurrentPage "plugins/DigestAuthenRealmAdmin.asp", qs
- EndErrorHandling "DigestAuthenRealmAdmin.asp"
-
- on error resume next
- PluginsASPCleanup
- %>